#ifndef _HTTPSERVERPARAMS_HPP_
#define _HTTPSERVERPARAMS_HPP_

#include "jhdefs.hpp"
#include "net/TCPServerParams.hpp"
#include "utils/autoptr.hpp"
using JHCPP::utils::TAutoPtr;
#include "stdlib/timespan.hpp"
using JHCPP::stdlib::CTimeSpan;

NET_NAMESPACE_BEGIN

class CHTTPServerParams : public CTCPServerParams
{
public:
	typedef TAutoPtr<CHTTPServerParams> Ptr;

	CHTTPServerParams();

	void setServerName(const std::string& serverName);
	const std::string& getServerName() const;

	void setSoftwareVersion(const std::string& softwareVersion);
	const std::string& getSoftwareVersion() const;

	void setTimeout(const CTimeSpan& timeout);
	const CTimeSpan& getTimeout() const;

	void setKeepAlive(bool keepAlive);
	bool getKeepAlive() const;
	void setKeepAliveTimeout(const CTimeSpan& timeout);
	const CTimeSpan& getKeepAliveTimeout() const;
	void setMaxKeepAliveRequests(int maxKeepAliveRequests);
	int getMaxKeepAliveRequests() const;

protected:
	virtual ~CHTTPServerParams();

private:
	std::string	m_serverName;
	std::string	m_softwareVersion;
	CTimeSpan	m_timeout;
	bool		m_keepAlive;
	int			m_maxKeepAliveRequests;
	CTimeSpan	m_keepAliveTimeout;
};

NET_NAMESPACE_END

#endif
